﻿
@{
    Layout = null;
}

<!doctype html>
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="keywords" content="天地图山东" />
    <title>天地图山东地图API－示例－ArcGIS动态地图服务图层加载</title>

    <link type="text/css" rel="stylesheet" href="http://www.sdmap.gov.cn/api/agsapi/javascript/js/esri/css/esri.css" />
    <script type="text/javascript" src="http://www.sdmap.gov.cn/api/agsapi/javascript/js/init.js"></script>

    <script type="text/javascript">

        //定义地图对象
        var map;
        //引入天地图山东矢量图层
        require(["esri/map", "tdlib/SDTDTLayer", "esri/geometry/Extent", "esri/layers/ArcGISDynamicMapServiceLayer", "dojo/domReady!"  ],
    function (Map, SDTDTLayer, Extent, ArcGISDynamicMapServiceLayer) {
        //地图初始化
        map = new Map("mapDiv",
         {
             logo: false,
             slider: false,
             nav: false,
             extent: new Extent({ xmin: 118.6, ymin: 35.4, xmax: 119.2, ymax: 35.5, spatialReference: { wkid: 4490} })
         });


        //图层初始化
        var sdvecLayer = new SDTDTLayer();
        //添加图层到地图
        map.addLayer(sdvecLayer);

        var layer = new ArcGISDynamicMapServiceLayer("http://124.128.48.217:6080/arcgis/rest/services/sdxzj/MapServer", {
            "opacity": 0.8
        });
        debugger;
        layer.setVisibleLayers([0, 1, 2]);
        map.addLayer(layer);

    }
    );



    </script>
</head>
<body>

    <div id="mapDiv" style="position:absolute;width:600px; height:500px">
    </div>
    <div style="position:absolute;left:650px;">
        ArcGIS动态地图服务图层加载
        <p><a href="http://www.sdmap.gov.cn/api/agsapi/examples.html">返回所有范例列表</a></p>



    </div>
</body>
</html>
